package com.itheima.dao;

import com.itheima.pojo.Menu;
import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(int id);

    List<Role> findAll();

    Map<String,Object> findAllPage();

    List<Role> findByCondition(String queryString);

    List<Permission> findPermissionSet();

    LinkedHashSet<Menu> findMenuLinkedHashSet();

    void add(Role role);

    void addRoleAndMenuRelations(Map<String, Integer> menumap);

    void addRoleAndPermissionRelations(Map<String, Integer> permissionmap);


    Role findById(Integer id);

    List<Integer> findMenuIdsByRoleId(Integer id);

    List<Integer> findPermissionIdsByRoleId(Integer id);

    void deleteById(Integer id);

    void edit(Role role);

    List<Integer> findRoleIdsByUserId(Integer id);

}
